1. Field of the Invention
The present invention relates to an electronic camera such as a digital still camera that captures an image of a subject and records the captured image as electronic image data.
2. Description of the Related Art
Digital cameras in the known art include those provided with an image-capturing device such as a CCD that captures an image of a subject image passed through the taking lens and outputs image data and an image processing circuit that performs image processing such as white balance adjustment and gamma control by adjusting the amplification gain to be used on the image data output by the image-capturing device. At the image processing circuit, image processing is performed by calculating parameters such as R gain and B gain for white balance adjustment or a gradation curve for gamma control in conformance with a predetermined algorithm based upon the image data output by the image-capturing device.
In such a digital camera in the prior art, color information corresponding to the main subject, the background and the like, the image of which has been captured, is averaged to calculate a white balance adjustment gain that will achieve an achromatic color. Then, white balance adjustment is performed on the image data using the adjustment gain thus calculated. When photographing a person using this camera, the following problems may occur depending upon the composition.
(1) The white balance adjustment value is calculated mainly using color information corresponding to the areas other than the skin-colored portion when the ratio of the area occupied by the skin-colored portion such as a face in the photographic field is small. Therefore, white balance adjustment implemented by using the white balance adjustment gain thus calculated on the skin-colored portion tends to be defective, and defective adjustment may result in a faded image or a tinted image.(2) When a person is photographed in closeup, as in portrait photographing, an achromatic color is often not achieved by averaging the color information if there are many highly saturated colors such as flowers and greenery in the background. As a result, the white balance adjustment calculated under those circumstances tends to be defective, which may change the hue of the skin color of the person.